package com.gitee.elf.api.common

import com.gitee.elf.core.data.Data
import com.gitee.elf.core.entity.AbstractProxyEntity
import com.gitee.elf.core.entity.EntityInstance

class MetaEntityWatcher<T: Data>(name: String, entity: AbstractProxyEntity<*>,val setter: T.() -> Unit = {}) : MetaWatcher<T>(name, entity.instance) {


    override fun onUpdate(value: T) {
        setter(value)
    }

}